DISCUSSION
The
ATSUGetAllLineControls function obtains, for a line of text, an array of the tags and data sizes corresponding to all previously set text layout attribute values. You can obtain a particular attribute value by passing the corresponding tag and data size pair to the function
ATSUGetLineControl. To obtain the tags and data sizes corresponding to all previously set text layout attribute values in an entire text layout object, call the function
ATSUGetAllLayoutControls.
The best way to use
ATSUGetAllLineControls is to call it twice:
-
Pass a reference to the text layout object containing the attribute in the iTextLayout parameter, NULL for the oAttributeInfoArray parameter, and 0 for the other parameters. ATSUGetAllLineControls returns the size of the oAttributeInfoArray array in the oTagValuePairCount parameter.
-
Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oAttributeInfoArray parameter; on return, the pointer references the oAttributeInfoArray array.